package com.trade.common.utils;

/**
 * Description:常量或状态值
 * Author: zfb
 * Date: 2016/2/25
 * Time: 15:22
 * Version: V1.0
 */
@SuppressWarnings("all")
public class Constants {
    /*
      *全局数据状态值
      */
    public static final String DATA_FLAG_OK="1";//数据正常
    public static final String DATA_FLAG_DELETE="2";//已删除
    public static final String DATA_FLAG_ERROR="0";//状态无效

    /*
     * 用户状态
     */
    public static final String USER_FLAG_USERED="1";//启用
    public static final String USER_FLAG_STOPED="2";//禁用
    public static final String USER_FLAG_ERROR="0";//状态无效
    /*
     * 用户登录状态
     */
    public static final String USER_FLAG_LOGIN="online";//登入
    public static final String USER_FLAG_LOGINOUT="unline";//登出
    /*
     * 用户审核状态
     */
    public static final String USER_AUDITFLAG_OK="1";//审核通过
    public static final String USER_AUDITFLAG_NO="2";//审核不通过
    public static final String USER_AUDITFLAG_WAIT="3";//待审核
    /*
     * 字典级别
     * */
    public static final String DIC_LEVEL_1="1";//一级（根级）
    public static final String DIC_LEVEL_2="2";//二级（字典分类）
    public static final String DIC_LEVEL_3="3";//三级（字典值）
    /*
     * 资源级别定义
     */
    public static final String RESOURCE_LEVEL_1="1";//一级资源，系统级别
    //public static final String RESOURCE_LEVEL_2="2";//二级资源，模块级别
    public static final String RESOURCE_LEVEL_2 ="2";//2级资源，平台级别
    public static final String RESOURCE_LEVEL_3 = "3";//3级资源，目录级别
    public static final String RESOURCE_LEVEL_4 = "4";//3级资源，菜单级别
    public static final String RESOURCE_LEVEL_5 = "5";//5级资源，按钮或功能级别
//    /*
//    * 资源级别定义
//    */
//    public static final String RESOURCE_LEVEL_1="1";//一级资源，即平台级别
//    public static final String RESOURCE_LEVEL_2="2";//二级资源，即菜单级别
//    public static final String RESOURCE_LEVEL_3="3";//三级资源，按钮或功能级别
    /*
    * 角色状态
    */
    public static final String ROLE_FLAG_USERED="1";//启用
    public static final String ROLE_FLAG_STOPED="2";//禁用
    public static final String ROLE_FLAG_ERROR="0";//状态无效

    /*
     * 通用状态
     */
    public static final String FLAG_USERED="1";//启用
    public static final String FLAG_STOPED="2";//禁用
    public static final String FLAG_ERROR="0";//状态无效

    /**
     * 部门级别
     */
    public static final String DEPARTMENT_LEVEL_ORG="1";//组织（一级）
    public static final String DEPARTMENT_LEVEL_DEPT="2";//部门（二级）
    public static final String DEPARTMENT_LEVEL_GROUP="3";//科室（三级）

    /**
     * 通用是、否状态：1-是；2-否
     */
    public static final String ISORNOT_IS="1";//是
    public static final String ISORNOT_NOT="2";//否

    /**
     * 报表数据统计方式：sum-求和；count-计算总条数
     */
    public static final String CHART_COUNT_CATALOG_SUM="sum";//求和
    public static final String CHART_COUNT_CATALOG_COUNT="count";//统计个数
    /**
     * 资源分类：system：子系统，module：子模块（菜单）；platform-平台；catalog-目录；menu-菜单；func-功能；btn-按钮
     */
    public static final String RESOURCE_SYSTEM = "system";
    //public static final String RESOURCE_MODULE = "model";
    public static final String RESOURCE_PLATFORM="platform";
    public static final String RESOURCE_CATALOG="catalog";
    public static final String RESOURCE_MENU="menu";
    public static final String RESOURCE_FUNC="func";
    public static final String RESOURCE_BTN="btn";
    public static final String RESOURCE_HTML="html";

    /**
     * ftp扫描下载文件和异常文件记录
     */
    public static final String FTP_TREE_LEVEL_1 = "1";//级别
    public static final String FTP_TREE_LEVEL_2 = "2";//级别
    public static final String FTP_TREE_LEVEL_3 = "3";//级别
    public static final String FTP_TREE_LEVEL_4 = "4";//级别
    public static final String FTP_RINEX_1HZ = "rinex_1Hz";//1hz根目录（地震局实际根目录）
    public static final String FTP_RINEX_30HZ = "rinex_30Hz";//30hz（地震局实际根目录）

    public static final String FTP_TREE_PARENTS_RESNAME="地震局GPS";
    public static final String FTP_TREE_1HZ_RESNAME="1Hz采集目录";
    public static final String FTP_TREE_30HZ_RESNAME="30Hz采集目录";
    public static final String FTP_TREE_PARENTS_ID="e16187c126084b49baa98b5026030001";
    public static final String FTP_TREE_1HZ_LEVEE_2_ID="e16187c126084b49baa98b50260301hz";
    public static final String FTP_TREE_30HZ_LEVEE_2_ID="e16187c126084b49baa98b50260330hz";

    /**
     * 传输日志归档状态
     */
    public static final String TRANSFE_LOG_ARCHIVE="1";//已归档
    public static final String TRANSFE_LOG_NOARCHIVE="2";//未归档

    /**
     * 平台编码定义
     */
    public static final String PLATFORM_CODE="p";//头
    /**
     * Token存放在session中的key
     */
    public static final String CURRENTTOKEN_KEY_IN_SESSION="current_token_key";
    /**
     * 平台存放在session中的key
     */
    public static final String CURRENTPLATFORM_KEY_IN_SESSION="current_platform_key";
    /**
     * YunPi登录系统平台编码
     */
    public static final String BASE_CLIENTID = "p000";
    /**
     * YunPi登录系统平台secret
     */
    public static final String TRADE_CLIENTSECRET = "trade";


    /**
     * HTTP请求方法
     */
    public static final String REQUEST_METHOD_POST = "POST";
    public static final String REQUEST_METHOD_GET = "GET";
    public static final String REQUEST_METHOD_PUT = "PUT";
    public static final String REQUEST_METHOD_DELETE = "DELETE";
    public static final String REQUEST_METHOD_PATCH = "PATCH";

    /**
     * 系统禁止访问角色
     */
    public static final String ROLE_SYSTEM_BAN_ACCESS = "ROLE_SYSTEM_BAN_ACCESS";

    /**
     * 服务代理列表查询条件json
     */
    public static final String SERVICE_PROXY_CONDITION_JSON_ARRAY = "conditionJsonArray";

    /**
     * 服务代理列表排序json
     */
    public static final String SERVICE_PROXY_SORT_JSON_ARRAY = "sortJsonArray";

    /**
     * 文件上传的属性名
     */
    public static final String SERVICE_PROXY_UPLOAD_FILE_NAME = "attachments";

    /**
     * 服务代理租户ID属性名
     */
    public static final String SERVICE_PROXY_TENANT_ID = "tenantId";

    /**
     * 服务代理用户ID属性名
     */
    public static final String SERVICE_PROXY_USER_ID = "userId";

    //开放接口
    public static final String OPEN_API_PARAM_CLIENT_ID = "clientId";
    public static final String OPEN_API_PARAM_KEY = "key";

    /**
     * 服务代理用户会话ID
     */
    public static final String SERVICE_PROXY_USER_SESSION_ID = "sessionId";

    /**
     *  代理请求类型
     */
    public static final String SERVICE_PROXY_REQ_TYPE_BASIC = "0";
    public static final String SERVICE_PROXY_REQ_TYPE_UPLOAD = "1";
    public static final String SERVICE_PROXY_REQ_TYPE_DOWNLOAD = "2";

    /**
     * 结果字符串
     */
    public static final String RESULT_SUCCESS = "Success";
    public static final String RESULT_FAILED = "Failed";

    /**
     * 权限元数据的租户ID
     */
    public static final String METADATA_TENANT_ID = "0000000000000000000000000000000";

    /**
     * 数据字典根节点
     */
    public static final String DICTIONARY_ROOT = "dictionaryRoot";

    /**
     * 租户初始化超管登录密码,111111
     */
    public static final String TENANT_INIT_USER_PASSWORD = "96e79218965eb72c92a549dd5a330112";

    /**
     * 未登录时系统匿名字符串
     */
    public static final String ANONYMOUS_USER = "anonymousUser";

    /**
     * 过滤GET请求中特殊字符
     */
    public static final String FILTER_SERVLET_PATH = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~！@#￥%……&*（）——+|{}【】‘；：”“’。，、？]";;
    //modify
    //"[`~!@#$%^*()+=|{}':;',\\[\\]<>~！@#￥%……&*（）——+|{}【】‘；：”“’。，、]";

    public static final String MODULE_NAME_BASE = "base";

    /**
     * 角色网络初始化权限默认值
     */
    public static final String ROLE_NET_INIT_DEFAULT = "allnet";

    public static final String RESULT_CODE="code";  //返回信息提示中操作状态Key值常量

    public static final String RESULT_INFO="info";  //返回信息提示中操作内容Key值常量

    public static final Integer RESULT_SUCCESS_CODE = 200; //返回成功码

    public static final Integer RESULT_ERROR_CODE = 500; //返回失败码 传参错误

    /**
     * 各子系统实体映射表统一前缀
     */
    public static final String TABLE_PREFIX_BASE = "base";
    public static final String TABLE_PREFIX_DAQ = "daq";
    public static final String TABLE_PREFIX_DCLEAN = "dclean";
    public static final String TABLE_PREFIX_SUPER_FUSION = "fusion";
    public static final String TABLE_PREFIX_DSERVICE = "dservice";


    /**
     * 统一使用分页大小
     */
    public static final String PAGE_SIZE = "15";

    /**
     * 主题映射映射审核角色
     */
    public static final String ROLE_SUBJECT_MAPPING_AUDIT = "ROLE_SUBJECT_MAPPING_AUDIT";

    /**
     * 主题数据边关系审核角色
     */
    public static final String ROLE_SUBJECT_EDGE_REL_AUDIT = "ROLE_SUBJECT_EDGE_REL_AUDIT";

    /**
     * 超级角色
     */
    public static final String ROLE_SUPER_ADMIN = "ROLE_SUPER_ADMIN";

    /**
     * 租户角色
     */
    public static final String ROLE_ADMIN = "ROLE_ADMIN";

    /**
     *
     *省厅 地市 类型
     * 1.省级 2.市级
     */
    public static final String DEP_TYPE_PROVINCE = "1";
    public static final String DEP_TYPE_CITY = "2";

    public interface YesOrNo {
        String YES = "y";
        String NO = "n";
    }

    //采集策略状态
    public static final String COLLECT_STATUS01="01";//启用
    public static final String COLLECT_STATUS02="02";//禁用

    //采集执行状态
    public static final String COLLECT_ISFINSH01="01";//未运行
    public static final String COLLECT_ISFINSH02="02";//正在运行
    public static final String COLLECT_ISFINSH03="03";//已完成

}
